package com.ruoyi.web.wuliu.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.wuliu.mapper.BankPaymentMapper;
import com.ruoyi.web.wuliu.domain.BankPayment;
import com.ruoyi.web.wuliu.service.IBankPaymentService;

/**
 * 银行卡支付信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-27
 */
@Service
public class BankPaymentServiceImpl implements IBankPaymentService 
{
    @Autowired
    private BankPaymentMapper bankPaymentMapper;

    /**
     * 查询银行卡支付信息
     * 
     * @param id 银行卡支付信息主键
     * @return 银行卡支付信息
     */
    @Override
    public BankPayment selectBankPaymentById(Integer id)
    {
        return bankPaymentMapper.selectBankPaymentById(id);
    }

    /**
     * 查询银行卡支付信息列表
     * 
     * @param bankPayment 银行卡支付信息
     * @return 银行卡支付信息
     */
    @Override
    public List<BankPayment> selectBankPaymentList(BankPayment bankPayment)
    {
        return bankPaymentMapper.selectBankPaymentList(bankPayment);
    }

    /**
     * 新增银行卡支付信息
     * 
     * @param bankPayment 银行卡支付信息
     * @return 结果
     */
    @Override
    public int insertBankPayment(BankPayment bankPayment)
    {
        bankPayment.setStatus("2");
        bankPayment.setPaymentTime(new Date());
        return bankPaymentMapper.insertBankPayment(bankPayment);
    }

    /**
     * 修改银行卡支付信息
     * 
     * @param bankPayment 银行卡支付信息
     * @return 结果
     */
    @Override
    public int updateBankPayment(BankPayment bankPayment)
    {
        return bankPaymentMapper.updateBankPayment(bankPayment);
    }

    /**
     * 批量删除银行卡支付信息
     * 
     * @param ids 需要删除的银行卡支付信息主键
     * @return 结果
     */
    @Override
    public int deleteBankPaymentByIds(Integer[] ids)
    {
        return bankPaymentMapper.deleteBankPaymentByIds(ids);
    }

    /**
     * 删除银行卡支付信息信息
     * 
     * @param id 银行卡支付信息主键
     * @return 结果
     */
    @Override
    public int deleteBankPaymentById(Integer id)
    {
        return bankPaymentMapper.deleteBankPaymentById(id);
    }
}
